Deploying Kanzi applications to Windows

You can build and deploy Kanzi applications to Windows:

Building and deploying Kanzi applications to Windows from Kanzi Studio

To run a Kanzi application on Windows, you need to have Visual C++ Redistributable x86 for Visual Studio 2015 installed.

To build and deploy your Kanzi application to Windows from Kanzi Studio:

  1. In Kanzi Studio create or open the project for your Kanzi application and select File > Export > Export as KZB Player for Windows.
    If you are asked whether you want Kanzi Studio to create the application directory structure, click Yes.
    Kanzi Studio builds the application source code and creates these files:
    1. binaries.cfg contains a list of all kzb files Kanzi created from your project.
    2. <ProjectName>.exe contains your Kanzi application and the Kanzi Application Player, which enables you to run your application as a standalone application.
    3. <project_name>.kzb contains your project in a binary format. See Using kzb files.
    4. <project_name>.kzb.txt contains a list of all project shortcuts, project resources, and nodes.
  2. When Kanzi Studio creates the application, it adds the link to the application in the Log window. Click the link to open the directory where Kanzi Studio created your application.
    Your application is stored in the Application Player directory of your Kanzi Studio project. To run the application, run the exe application file.

Building Kanzi applications from Visual Studio

When you create a Kanzi Studio project with a C++ application, Kanzi creates the Visual Studio solution and project files. See Tutorial: Hello world!.

To build your Kanzi application from Visual Studio:

  1. In Kanzi Studio create or open the project for your Kanzi application and select File > Export > Export KZB.
    Kanzi Studio creates the kzb file for your application in the <ProjectName>/Application/bin.
  2. Open the Visual Studio solution for your Kanzi application stored in <ProjectName>/Application/configs/platforms/win32/<ProjectName>.sln, and apply these configurations:
  3. Select Build > Build Solution to build the application.
    Visual Studio creates the application executable in the <ProjectName>/Application/output directory.

You can specify the relative location to the Kanzi Engine in the project configuration file <ProjectName>/Application/configs/platforms/win32/application.vsprops.

Building Kanzi applications for Windows manually

SCons runs the SConstruct file in the configuration directory of the platform from which you run the scons command. SConstruct file is the entry point for building the application and contains the information about the Kanzi Engine location and runs these files:

To build your Kanzi application for Windows manually:

  1. Open the command line in the configuration directory of the platform for which you want to build the Kanzi application (<ProjectName>/Application/configs/platforms/<PlatformName>) and make sure you have the correct environmental variables set. See Setting the Kanzi environment variables.
    For example, to build your Kanzi application for:
  2. Run the scons command with the build parameters for your Kanzi application.

    Syntaxscons <library> <type> <name>
    Parameters
    library

    (Optional) the graphics library:

    • ES2 builds the application with OpenGL ES 2.0
    • GL builds the application with OpenGL
    type

    (Optional) the build type:

    • Release builds the application with compiler optimizations enabled. The release option builds smaller files than the debug option. Use this option for production purposes. Default value.
    • Debug builds the application with disabled compiler optimizations and contains full debug information you can use with a debugger. The debug option builds larger files and debug applications run slower. Use this option for development purposes.
    • Profiling builds the application with compiler optimizations enabled and links the application against the Profiling build. Use this option when you want to measure the performance of different parts of Kanzi Engine. For example, when you want to find out how much time Kanzi uses on different tasks during application startup, or which parts of the application take a lot of time to run. See Measuring application performance.
    name(Optional) the name of the project
    Examples

    // Builds the application with the default settings as specified
    // in config.py and SConstruct configuration files.
    scons
    // Builds the debug version of the application with
    // the OpenGL graphics library.
    scons GL debug
    // Builds the debug version of the application with the
    // OpenGL ES 2.0 graphics library from the Kanzi Studio
    // project named MyProject.
    scons ES2 debug MyProject

    Scons builds the Kanzi application source code and binary files in the <ProjectName>/Application/output directory.

See also

Installing the Kanzi build environment manually

Tutorial: Create a simple in-vehicle infotainment application

Tutorial: Hello world!

Deploying Kanzi applications